<%@ page language="java" import="java.util.*,model.*" pageEncoding="utf-8"%>
<%@page import="org.springframework.web.context.request.SessionScope"%>
 <%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<title>创业者信息</title>
	<script language="javascript" type="text/javascript"
			src="My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="../js/jquery.js"></script>
	<script type="text/javascript" src="../js/ajaxfileupload.js"></script>
	<script type="text/javascript">
	function ajaxEduFileUpload(obj)
    {       
		$.ajaxFileUpload
		(
			{
				url:'EstpInfoAction!upEduFile.action',
				secureuri:false,
				fileElementId:'eduFile',
				dataType: 'json',
				success: function (data, status)
				{
				alert("success");
				//change select
				   var nf = obj.cloneNode(true);
                   obj.parentNode.replaceChild(nf, obj);
                   //end change
					if(typeof(data.error) != 'undefined')
					{
						if(data.error != '')
						{
							alert(data.error);
						}else
						{
							alert(data.msg);
						}
					}
				},
				error: function (data, status, e)
				{
				alert("error");
				  //change select
				   var nf = obj.cloneNode(true);
                   obj.parentNode.replaceChild(nf, obj);
                   //end change
					alert(e);
				}
			}
		)
		
		return false;

	}
	
	function ajaxDegreeFileUpload(obj)
    {       
		$.ajaxFileUpload
		(
			{
				url:'EstpInfoAction!upDegreeFile.action',
				secureuri:false,
				fileElementId:'degreeFile',
				dataType: 'json',
				success: function (data, status)
				{
				alert("success");
				//change select
				   var nf = obj.cloneNode(true);
                   obj.parentNode.replaceChild(nf, obj);
                   //end change
					if(typeof(data.error) != 'undefined')
					{
						if(data.error != '')
						{
							alert(data.error);
						}else
						{
							alert(data.msg);
						}
					}
				},
				error: function (data, status, e)
				{
				alert("error");
				  //change select
				   var nf = obj.cloneNode(true);
                   obj.parentNode.replaceChild(nf, obj);
                   //end change
					alert(e);
				}
			}
		)
		
		return false;

	}
	</script>
    <style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
-->
    </style>
</head>
  <body> 	
	<%	
		int a,b,c,d,e,f,g,h;
		EstpInfo ei = (EstpInfo)request.getAttribute("E");
		if(ei != null){
			a = ei.getEstpSex();
			b = ei.getEducation();
			c = ei.getDegree();
			d = ei.getStuProject();
			e = ei.getProfessional();
			f = ei.getJob();
			g = ei.getContinent();
			h = ei.getComPerson();
		}else{
			a = 1;
			b = 0;
			c = 0;
			d = 1;
			e = 1;
			f = 1;
			g = 1;
			h = 1;
		}
	%>
    <div>
		<table borderColor=#e2e2e1 cellSpacing=0 cellPadding=0  
				align=center bgColor=#ffffff border=0>
			<tr>
				<td align="center">
								<h3>请输入创业者基本信息</h3>				</td>
				<td align="center"></td>
			</tr>
			<tr>
				<td>
				<!-- 添加文件上传功能 -->
				<form  method="post"  name="form1" action="EstpInfoAction" enctype="multipart/form-data" id="form1">
					<table bgColor=#c0ccdd>
						<tr class=top>
						
							<td align="right" >
						  <div align=right><strong>姓名（中文）：</strong></div>							</td>
							<td>
								<input type=text id="estpName" name="estpName" value="<s:property value='itemEstp.estpName' />"	/>
							   <div id="div_estpName" class=red></div>		
							  			 </td>
						</tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>性别：</strong></div>							</td>
							<td>
								<INPUT type=radio value=1 name="estpSex" <%if(1==a) {%> CHECKED<%}%>/>
								男
								<INPUT type=radio value=0 name="estpSex" <%if(0==a) {%> CHECKED<%}%>/>
								女							</td>
						</tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>出生日期：</strong></div>							</td>
							<td>
								<input id="estpBirthday" name="estpBirthday" class="Wdate" type="text" onClick="WdatePicker()" value="<s:property value='itemEstp.estpBirthday' />" />                          </td>
						</tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>最高学历:</strong></div>							</td>
							<td>
								<select name="education">
									<option value="0" <%if(0==b) {%> selected="selected"<%}%>>
										博士研究生（博士后）									</option>
									<option value="1" <%if(1==b) {%> selected="selected"<%}%>>
										研究生									</option>
									<option value="2" <%if(2==b) {%> selected="selected"<%}%>>
										本科生									</option>
									<option value="3" <%if(3==b) {%> selected="selected"<%}%>>
										专科生									</option>
									<option value="4" <%if(4==b) {%> selected="selected"<%}%>>
										中专生									</option>
								</select>						  
								上传学历证书：<input type="file" name="eduFile" id="eduFile" onChange="ajaxEduFileUpload(this);" />						</td>
						</tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>最高学位:</strong></div>							</td>
							<td>
								<select   name="degree" id="degree">
									<option value="0" <%if(0==c) {%> selected="selected"<%}%>>
										博士研究生（博士后）									</option>
									<option value="1" <%if(1==c) {%> selected="selected"<%}%>>
										硕士									</option>
									<option value="2" <%if(c==2) {%> selected="selected"<%}%>>
										学士									</option>									 
								</select>								
								上传学位证书：<input type="file" name="degreeFile" id="degreeFile" onChange="ajaxDegreeFileUpload(this);" />							</td>
						</tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>所学专业:</strong></div>							</td>
							<td>
								<select   name="stuProject" id="stuProject">
									<option value="1" <%if(d==1) {%> selected="selected"<%}%>>
										航空航天类									</option>
									<option value="2" <%if(d==2) {%> selected="selected"<%}%>>
										武器类									</option>
									<option value="3" <%if(d==3) {%> selected="selected"<%}%>>
										生物类									</option>
									<option value="4" <%if(d==4) {%> selected="selected"<%}%>>
										公安技术类									</option>
									<option value="5" <%if(d==5) {%> selected="selected"<%}%>>
										农业类									</option>
									<option value="6" <%if(d==6) {%> selected="selected"<%}%>>
										医学类									</option>
									<option value="7" <%if(d==7) {%> selected="selected"<%}%>>
										图书档案学类									</option>
									<option value="8" <%if(d==8) {%> selected="selected"<%}%>>
										电子信息类									</option>
									<option value=9" <%if(d==9) {%> selected="selected"<%}%>>
										管理科学与工程类									</option>
									<option value="10" <%if(d==10) {%> selected="selected"<%}%>>
										工商管理类									</option>
									<option value="11" <%if(d==11) {%> selected="selected"<%}%>>
										公共管理类									</option>
									<option value="12" <%if(d==12) {%> selected="selected"<%}%>>
										机械类									</option>
									<option value="13" <%if(d==13) {%> selected="selected"<%}%>>
										建筑学									</option>
									<option value="14" <%if(d==14) {%> selected="selected"<%}%>>
										语言文学类									</option>
									<option value="15" <%if(d==15) {%> selected="selected"<%}%>>
										教育学类									</option>
									<option value="16" <%if(d==16) {%> selected="selected"<%}%>>
										法学类									</option>
									<option value="17" <%if(d==17) {%> selected="selected"<%}%>>
										经济学类									</option>
									<option value="18" <%if(d==18) {%> selected="selected"<%}%>>
										哲学类									</option>
									<option value="19" <%if(d==19) {%> selected="selected"<%}%>>
										艺术类									</option>
									<option value="20" <%if(d==20) {%> selected="selected"<%}%>>
										历史学类									</option>
									<option value="21" <%if(d==21) {%> selected="selected"<%}%>>
										数学类									</option>
									<option value="22" <%if(d==22) {%> selected="selected"<%}%>>
										物理学类									</option>
									<option value="23" <%if(d==23) {%> selected="selected"<%}%>>
										化学类									</option>
									<option value="24" <%if(d==24) {%> selected="selected"<%}%>>
										天文地质地理类									</option>
									<option value="25" <%if(d==25) {%> selected="selected"<%}%>>
										力学类									</option>
									<option value="26" <%if(d==26) {%> selected="selected"<%}%>>
										材料类									</option>
									<option value="27" <%if(d==27) {%> selected="selected"<%}%>>
										环境科学与安全类									</option>
									<option value="28" <%if(d==28) {%> selected="selected"<%}%>>
										仪器仪表类									</option>
									<option value="29" <%if(d==29) {%> selected="selected"<%}%>>
										能源动力类									</option>
									<option value="30" <%if(d==30) {%> selected="selected"<%}%>>
										水利类									</option>
									<option value="31" <%if(d==31) {%> selected="selected"<%}%>>
										测绘类									</option>
									<option value="32"<%if(d==32) {%> selected="selected"<%}%>>
										制药工程类									</option>
									<option value="33" <%if(d==33) {%> selected="selected"<%}%>>
										交通运输类									</option>
									<option value="34" <%if(d==34) {%> selected="selected"<%}%>>
										船舶与海洋工程类									</option>
									<option value="35" <%if(d==35) {%> selected="selected"<%}%>>
										轻工纺织食品类									</option>
								</select>							</td>
						</tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>现从事专业：</strong></div>							</td>
							<td>
								<select   name="professional" id="professional">
									<option value="1" <%if(e==1) {%> selected="selected"<%}%>>
										航空航天类									</option>
									<option value="2" <%if(e==2) {%> selected="selected"<%}%>>
										武器类									</option>
									<option value="3" <%if(e==3) {%> selected="selected"<%}%>>
										生物类									</option>
									<option value="4" <%if(e==4) {%> selected="selected"<%}%>>
										公安技术类									</option>
									<option value="5" <%if(e==5) {%> selected="selected"<%}%>>
										农业类									</option>
									<option value="6" <%if(e==6) {%> selected="selected"<%}%>>
										医学类									</option>
									<option value="7" <%if(e==7) {%> selected="selected"<%}%>>
										图书档案学类									</option>
									<option value="8" <%if(e==8) {%> selected="selected"<%}%>>
										电子信息类									</option>
									<option value=9" <%if(e==9) {%> selected="selected"<%}%>>
										管理科学与工程类									</option>
									<option value="10" <%if(e==10) {%> selected="selected"<%}%>>
										工商管理类									</option>
									<option value="11" <%if(e==11) {%> selected="selected"<%}%>>
										公共管理类									</option>
									<option value="12" <%if(e==12) {%> selected="selected"<%}%>>
										机械类									</option>
									<option value="13" <%if(e==13) {%> selected="selected"<%}%>>
										建筑学									</option>
									<option value="14" <%if(e==14) {%> selected="selected"<%}%>>
										语言文学类									</option>
									<option value="15" <%if(e==15) {%> selected="selected"<%}%>>
										教育学类									</option>
									<option value="16" <%if(e==16) {%> selected="selected"<%}%>>
										法学类									</option>
									<option value="17" <%if(e==17) {%> selected="selected"<%}%>>
										经济学类									</option>
									<option value="18" <%if(e==18) {%> selected="selected"<%}%>>
										哲学类									</option>
									<option value="19" <%if(e==19) {%> selected="selected"<%}%>>
										艺术类									</option>
									<option value="20" <%if(e==20) {%> selected="selected"<%}%>>
										历史学类									</option>
									<option value="21" <%if(e==21) {%> selected="selected"<%}%>>
										数学类									</option>
									<option value="22" <%if(e==22) {%> selected="selected"<%}%>>
										物理学类									</option>
									<option value="23" <%if(e==23) {%> selected="selected"<%}%>>
										化学类									</option>
									<option value="24" <%if(e==24) {%> selected="selected"<%}%>>
										天文地质地理类									</option>
									<option value="25" <%if(e==25) {%> selected="selected"<%}%>>
										力学类									</option>
									<option value="26" <%if(e==26) {%> selected="selected"<%}%>>
										材料类									</option>
									<option value="27" <%if(e==27) {%> selected="selected"<%}%>>
										环境科学与安全类									</option>
									<option value="28" <%if(e==28) {%> selected="selected"<%}%>>
										仪器仪表类									</option>
									<option value="29" <%if(e==29) {%> selected="selected"<%}%>>
										能源动力类									</option>
									<option value="30" <%if(e==30) {%> selected="selected"<%}%>>
										水利类									</option>
									<option value="31" <%if(e==31) {%> selected="selected"<%}%>>
										测绘类									</option>
									<option value="32" <%if(e==32) {%> selected="selected"<%}%>>
										制药工程类									</option>
									<option value="33" <%if(e==33) {%> selected="selected"<%}%>>
										交通运输类									</option>
									<option value="34" <%if(e==34) {%> selected="selected"<%}%>>
										船舶与海洋工程类									</option>
									<option value="35" <%if(e==35) {%> selected="selected"<%}%>>
										轻工纺织食品类									</option>
								</select>						  </td>
						</tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>职务职称：</strong></div>							</td>
							<td>
								<select   name="job" id="job">									
									<option value="1" <%if(f==1) {%> selected="selected"<%}%>>
										学生									</option>
									<option value="2" <%if(f==2) {%> selected="selected"<%}%>>
										高等院校									</option>
									<option value="3" <%if(f==3) {%> selected="selected"<%}%>>
										研究院所									</option>
									<option value="4" <%if(f==4) {%> selected="selected"<%}%>>
								                       工程技术									</option>
									<option value="5" <%if(f==5) {%> selected="selected"<%}%>>
										会计									</option>
									<option value="6" <%if(f==6) {%> selected="selected"<%}%>>
									           统计									</option>
									<option value="7" <%if(f==7) {%> selected="selected"<%}%>>
										经济									</option>
									<option value="8" <%if(f==8) {%> selected="selected"<%}%>>
									            艺术									</option>
									<option value="9" <%if(f==9) {%> selected="selected"<%}%>>
									               公司									</option>
									<option value="10" <%if(f==10) {%> selected="selected"<%}%>>
								                         社会									</option>
								</select>						  </td>
						</tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>国籍：</strong></div>							</td>
							<td>
								<select   name="continent" id="continent">									
									<option value="1" <%if(g==1) {%> selected="selected"<%}%>>
										亚洲									</option>
									<option value="2" <%if(g==2) {%> selected="selected"<%}%>>
										欧洲									</option>
									<option value="3" <%if(g==3) {%> selected="selected"<%}%>>
										北美洲									</option>
									<option value="4" <%if(g==4) {%> selected="selected"<%}%>>
										非洲									</option>
									<option value="5" <%if(g==5) {%> selected="selected"<%}%>>
										南美洲									</option>
									<option value="6" <%if(g==6) {%> selected="selected"<%}%>>
										大洋洲									</option>
								</select>
								<!--  
								<select   name="country" id="country">
									<option selected="selected" value="-1">
										请选择
									</option>
								 </select>
								 -->						  </td>
						</tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>身份证或护照号：</strong></div>							</td>
							<td>
							 <input type=text id="decIdno" name="decIdno" value="<s:property value='itemEstp.decIdno' />" />
									<div id="decIdnodiv"></div>							</td>
					  </tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>目前工作单位及地区：</strong></div>							</td>
							<td>
							   所在城市：<input type=text name="city" value="<s:property value='itemEstp.city' />" />工作单位：<input type=text name="company"  value="<s:property value='itemEstp.company' />"/>							</td>
						</tr>
						 <tr class=top>
							<td align="right">
						   <div align=right><strong>是否担任拟办公司法人：</strong></div>							</td>
							<td>
								 <select   name="comPerson" id="comPerson">
									<option <%if(h==1) {%> selected="selected"<%}%> value="1">
										是									</option>
									<option value="0" <%if(h==0) {%> selected="selected"<%}%>>
										否									</option>
								 </select>						   </td>
						</tr>
					 <tr class=top>
							<td align="right">
					   <div align=right><strong>联系电话(含区号)：</strong></div>							</td>
							<td>
								<input type=text name="estpPhone" id="estpPhone" value="<s:property value='itemEstp.estpPhone' />">					   </td>
					  </tr>
						 <tr class=top>
							<td align="right">
						   <div align=right><strong>境内手机：</strong></div>							</td>
							<td> <input type=text name="estpCoPhone" id="estpCoPhone" value="<s:property value='itemEstp.estpCoPhone' />" />						   </td>
						</tr>
					  <tr class=top>
							<td align="right">
						<div align=right><strong>国内传真：</strong></div>							</td>
							<td> <input type=text name="inFax" id="inFax" value="<s:property value='itemEstp.inFax' />" />					    </td>
					  </tr>
						<tr class=top>
							<td align="right">
						  <div align=right><strong>电子邮箱：</strong></div>							</td>
							<td><input type=text id="email" name="email" value="<s:property value='itemEstp.email' />" /><div id="div_email"></div>						 </td>
						</tr>
						<tr class=top>
							<td colspan="2" align="center">
								<input type="submit" value="提交" />
								<input type=reset value="重置" />						  </td>
						</tr>
				  </table>
		 		  </form>
				</td>
			</tr>
	  </table>
  </div>
	</body>
</html>
